<template>
	<view class="navigation-box">
		<view class="title">{{navigationMsg.title}}</view>
		<!-- <view class="right"></view> -->
	</view>
</template>

<script>
	export default {
		props: {
			navigationMsg: {
				type: Object,
				default: {}
			}
		},
		onShow() {
			this.getSetting()
		},
		data() {
			return {
				//背景色
				bgColor: "#fff",
				//文本色
				textColor: "#2A2D2E"
			}
		},
		methods: {
			getSetting() {
				uni.request({
					url: "/api/index/getSetting",
					method: "POST"
				}).then(res => {
					document.documentElement.style.setProperty('--bg-color', res.data.data.theme_color);
					document.documentElement.style.setProperty('--text-color', res.data.data.font_color);
				})
			},
		}
	}
</script>
<style type="text/css">
	@import url("@/static/icon/style.css");
</style>
<style lang="scss" scoped>
	:root {
		--bg-color: ;
		--text-color: ;
	}

	.navigation-box {
		width: 100vw;
		height: 15vw;
		display: flex;
		align-items: center;
		justify-content: space-between;
		background-color: var(--bg-color);

		.title {
			font-size: 7vw;
			margin-top: 2vw;
			margin-left: 4vw;
			font-weight: bold;
			color: var(--text-color);
		}

		.right {
			width: 6vw;
			height: 6vw;
			border-radius: 50%;
			margin-top: 5vw;
			margin-right: 4vw;
			font-family: "icomoon";
			font-size: 6vw;
			color: var(--text-color);
		}

		.right::before {
			content: "\e900";
		}
	}
</style>